<?
	class CategoryController extends AppController{
		public function index(){
			$this->set('Category',$this->Category->find('all'));
		}

		public function admin_index(){
			$this->set('Category',$this->Category->find('all'));
		}

		public function admin_add(){
			if($this->request->is('post')){
				$this->Category->create();
				if($this->Category->save($this->request->data)){
					$this->Session->setFlash(__('Category has been saved'));
					return $this->redirect(array('action'=>'index'));
				}
			}
		}
	}
?>